package expressions.slogo;

import java.util.List;
import parsing.Token;

/**
 * Returns the direction that the turtle is currently facing, in degrees.
 */
@Token(regex = "heading")
public class Heading extends TurtleCommand
{

    public Heading()
    {
        super(0);
    }

    @Override
    protected Double combineResults(List<Double> results, ITurtleContext context)
    {
        return context.getTurtle().getAngle().getDegrees();
    }

}
